package com.taxi.serviceDriverUser.service;

import com.taxi.common.dto.Car;
import com.taxi.common.dto.ResponseResult;
import com.taxi.serviceDriverUser.mapper.CarMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.security.PrivateKey;
import java.time.LocalDateTime;

/**
 * @Author ruomengjiang
 * @Date 2022/7/31
 * @Description : online-taxi
 * @Version: 1.0
 */
@Service
public class CarService {

    @Autowired
    private CarMapper carMapper;


    public ResponseResult addCar(Car car) {
        LocalDateTime now = LocalDateTime.now();
        car.setGmtCreate(now);
        car.setGmtModified(now);
        carMapper.insert(car);
        return ResponseResult.success("");
    }
}
